<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<style>
		.card{
            width: 300px;
			background-color: #ff0;
			padding: 10px 10px 10px 10px;
			margin-bottom: 30px;
			text-align: center;
			/*line-height: 300px;*/
		}
		img{
			width: 100%;
		}
		p{
			border: 5px solid red;
			margin: 10px 20px 30px 40px;
		}
	</style>
</head>
<body>
	<h1>盒子模型</h1>
	<div class="card">
		<img src="img/1.png" alt="">
		<p>我是文字</p>
	</div>
<div class="card">
	<img src="img/1.png" alt="">
	<p>我是文字</p>
</div>
</body>
</html>